package com.mlc.wx.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mlc.common.annotation.Excel;
import com.mlc.common.core.domain.BaseEntity;

/**
 * 微信用户对象 w_user
 *
 * @author ZFC
 * @date 2024-06-30
 */
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 微信小程序用户openid */
    @Excel(name = "微信小程序用户openid")
    private String openId;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String nickName;

    /** 用户头像 */
    @Excel(name = "用户头像")
    private String photo;

    /** 性别（1男 2女 3保密） */
    @Excel(name = "性别", readConverterExp = "1=男,2=女,3=保密")
    private Integer gender;

    /** 用户状态（0正常 1停用） */
    @Excel(name = "用户状态", readConverterExp = "0=正常,1=停用")
    private Integer status;

    /** 删除标志（0否 1是） */
    @Excel(name = "删除标志", readConverterExp = "0=否,1=是")
    private Integer delFlag;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setOpenId(String openId)
    {
        this.openId = openId;
    }

    public String getOpenId()
    {
        return openId;
    }

    public void setNickName(String nickName)
    {
        this.nickName = nickName;
    }

    public String getNickName()
    {
        return nickName;
    }

    public void setPhoto(String photo)
    {
        this.photo = photo;
    }

    public String getPhoto()
    {
        return photo;
    }

    public void setGender(Integer gender)
    {
        this.gender = gender;
    }

    public Integer getGender()
    {
        return gender;
    }

    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("openId", getOpenId())
            .append("nickName", getNickName())
            .append("photo", getPhoto())
            .append("gender", getGender())
            .append("remark", getRemark())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    public User(String openId, String nickName, String photo, Integer gender,String createBy) {
        this.openId = openId;
        this.nickName = nickName;
        this.photo = photo;
        this.gender = gender;
        this.setCreateBy(createBy);
    }

    public User() {
    }
}
